﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DocImprGrp.aspx.cs" Inherits="DECOR.WebApp.DocImprGrp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    
    <style type="text/css">
        body
        {
        	font-family: Arial, Tahoma;
            font: 10px;
            padding: 0 0 0 0;
        }
        
        #topContent
        {
        	height:80pt;
        }
        
        #logo
        {
        	float: left;
        	text-align: left;
        }
        #fecha
        {
        	float: right;
        	text-align: left;
        	padding-top: 20pt;
        	padding-right: 50pt;
        	width: 150pt;
        	font-family: Arial, Helvetica, sans-serif;
            height: 75px;
        }
        
        #mainContent
        {
        	height:43px;
        }
        
        #tituloContent
        {
        	height:37px;
        }
        
        #direccion
        {
        	font-family: Arial, Helvetica, sans-serif;
        	width: 200pt;
        	height: 29pt;
        }
        #titulo
        {
        	width: 200pt;
        	float: left;
        	text-align: center;
            height: 17px;
            margin-right: 0px;
        }
        #otroDerecha
        {
        	width: 131pt;
        	float: right;
        	text-align: left;
        }
        #Div2
        {
            height: 43px;
            /*width: 275px;*/
            width: 220px;
        }
        .style4
        {
            width: 98px;
        }
        .style8
        {
            width: 27px;
        }
        </style>
    <link rel ="stylesheet"  href="css/Impresion.css" />
</head>

<body>
    <form id="form1" runat="server">
    
    <table style="width: 100%;">
        <tr>
            <td colspan="2">
                <input id="btnImprimir" type="image" src="img/print22.png" 
                        alt="Imprimir" title="Imprimir" onclick="imprimirPagina();" />
            </td>
        </tr>
        
        <tr>
            <td style="text-align:left; vertical-align:top; width:12%;">
                <div>
                    <img src="img/logo.decor2.jpg" alt="" title="" 
                        style="border-style: none;" />
                </div>
            </td>
                <td style="text-align:center; vertical-align:middle; width:13%;">
                <asp:Label ID="lblSociedad" runat="server" Font-Names="Arial" Font-Size="14px" Font-Bold="True" /><br />
                <asp:Label ID="lblSociedadtxt" runat="server" Text="" Font-Size="10px" Font-Names="Arial" CssClass="direccion" />
                
            </td>
            <td style="text-align:center; vertical-align:middle; width:50%;">
                <asp:Label ID="lblCoti" runat="server" Font-Names="Arial" Font-Size="14px" Font-Bold="True" />
                <asp:Label ID="lblCotiza" runat="server" Font-Names="Arial" Font-Size="14px" Font-Bold="True" />
            </td>
            <td style="text-align:left; vertical-align:middle; width:25%;">
                <table style="width:100%;">
                    <tr>
                        <td style="font-size:10px; vertical-align: top;">Fecha: </td>
                        <td style="vertical-align: top;"><asp:Label ID="lblFecha" runat="server" Font-Size="10px" /></td>
                    </tr>
                    <tr>
                        <td style="font-size:10px; vertical-align: top;">Asesor Comercial: </td>
                        <td style="vertical-align: top;"><asp:Label ID="lblVendedor" runat="server" Font-Names="Arial" Font-Size="10px"></asp:Label><br /></td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    
    
    <div id="tituloContent">
        <div id="direccion">
           <asp:Label ID="lblDireccionLogo" runat="server" Text="" Font-Size="9px" Font-Names="Arial" CssClass="direccion" />
            <br />
            <asp:Label ID="lblTelefonosLogo" runat="server" Text="" Font-Size="9px" CssClass="direccion" />
        </div>
        
        
      
            <table style="width:100%; font-family: Arial, Helvetica, sans-serif;">
                <tr>
                    <td class="style4"style="font-size: 10px">
                        Señor(es)</td>
                    <td class="style8"style="font-size: 10px">
                        :</td>
                    <td>
                        <asp:Label ID="lblCliente" runat="server" Font-Names="Arial" Font-Size="10px"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style4"style="font-size: 10px">
                        Att</td>
                    <td class="style8"style="font-size: 10px">
                        :
                    </td>
                    <td>
                        <asp:Label ID="lblAtt" runat="server" Font-Names="Arial" Font-Size="10px"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style4" style="font-size: 10px">
                        <asp:Label ID="lblDireccion1" runat="server" Text="Dirección"></asp:Label>
                    </td>
                    <td class="style8" style="font-size: 10px">
                        :
                    </td>
                    <td>
                        <asp:Label ID="lblDirecc" runat="server" Font-Names="Arial" Font-Size="10px"></asp:Label> 
                    </td>
                </tr>
                <tr>
                    <td class="style4"style="font-size: 10px">
                        RUC / D.N.I.</td>
                    <td class="style8"style="font-size: 10px">
                        :</td>
                    <td>
                        <asp:Label ID="lblRuc" runat="server" Font-Names="Arial" Font-Size ="10px" ></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style4"style="font-size: 10px">
                        <asp:Label ID="lblTelefono1" runat="server" Text="Telefono"></asp:Label>
                    </td>
                    <td class="style8"style="font-size: 10px">
                        :
                    </td>
                    <td>
                        <asp:Label ID="lblTelef" runat="server" Font-Names="Arial" Font-Size="10px"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style4"style="font-size: 10px">
                        Cond. Pago
                    </td>
                    <td class="style8"style="font-size: 10px">
                        :
                    </td>
                    <td>
                        <asp:Label ID="lblCondpago" runat="server" Font-Names="Arial" Font-Size="10px"></asp:Label>
                    </td>
                </tr>
            </table>
            <br />
        <div id="grilla">
            
            <asp:DataList ID="dlDetalle" runat="server" CellPadding="0" Width="100%"
                        Font-Size="10px" GridLines="None" CellSpacing="0">
                
                <ItemTemplate>
                
                    <table style="width:100%; font-size:10px; border: solid 1px; padding: 0 0 0 0;">
                        <tr>
                            <th colspan="9" style="text-align:left;">
                                <asp:Label ID="lblNombreGrupo" runat="server" Text='<%# Bind("DescGrupo") %>' />
                            </th>
                        </tr>
                        <tr>
                            <th style="width:5%;">Item</th>
                            <th style="width:10%;">Código</th>
                            <th style="width:5%;">Und</th>
                            <th style="width:8%;">Cant.</th>
                            <th style="width:35%;">Descripción</th>
                            <th style="width:10%;">Precio s/IGV</th>
                            <th style="width:10%;">Precio c/IGV</th>
                            <th style="width:10%;">Total</th>
                            <th style="width:7%;">Alm</th>
                        </tr>
                    </table>
                
                    <asp:DataList ID="dlDetalleItem" runat="server" CellPadding="0" Width="100%"
                        Font-Size="10px" GridLines="None" CellSpacing="0" DataSource='<%# Bind("Detalle") %>'>
                        
                        <ItemTemplate>
                            <table style="width:100%; font-size:10px; border-bottom: solid 1px; border-left: solid 1px; border-right: solid 1px; border-collapse: separate;">
                                <tr>
                                    <td style="width:5%; text-align:center;">
                                        <asp:Label ID="lblPosicion" runat="server" Text='<%# Bind("Posicion") %>' />
                                    </td>
                                    <td style="width:10%;">
                                        <asp:Label ID="lblCodMaterial" runat="server" Text='<%# Bind("CodMaterialCorto") %>' />
                                    </td>
                                    <td style="width:5%;">
                                        <asp:Label ID="lblUMedida" runat="server" Text='<%# Bind("CodUMedida") %>' />
                                    </td>
                                    <td style="width:8%; text-align:right;">
                                        <asp:Label ID="lblCantidad" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Cantidad","{0:n3}") %>' />
                                    </td>
                                    <td style="width:35%;">
                                        <asp:Label ID="lblDescMaterial" runat="server" Text='<%# Bind("DescMaterial") %>' />
                                    </td>
                                    <td style="width:10%; text-align:right;">
                                        <asp:Label ID="lblPrecioUnitario" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PrecioSinIGV","{0:n2}") %>' />
                                    </td>
                                    <td style="width:10%; text-align:right;">
                                        <asp:Label ID="lblIgvTotal" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "PrecioConIGV","{0:n2}") %>' />
                                    </td>
                                    <td style="width:10%; text-align:right;">
                                        <asp:Label ID="lblTotal" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "TotalImpresion","{0:n2}") %>' />
                                    </td>
                                    <td style="width:7%; text-align:right;">
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("CodCentro") %>' />
                                    </td>
                                </tr>
                            </table>
                        </ItemTemplate>
                        
                    </asp:DataList>
                
                
                    <table style="width:100%; font-size:10px; border: solid 1px; border-collapse: separate;">
                        <tr>
                            <td colspan="5" style="text-align: right; width: 62%;">
                                <asp:Label ID="lblTotalLabel" runat="server" Text="Sub-Total:" />
                            </td>
                            <td style="text-align:right; width: 10%;">
                                <asp:Label ID="lblTotalSinIGVGrupo" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "TotalSinIGVGrupo","{0:n2}") %>' />
                            </td>
                            <td style="text-align:right; width: 10%;">
                                <asp:Label ID="lblTotalConIGVGrupo" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "TotalConIGVGrupo","{0:n2}") %>' />
                            </td>
                            <td style="text-align:right; width: 10%;">
                                <asp:Label ID="lblTotalGrupo" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "TotalGrupo","{0:n2}") %>' />
                            </td>
                            <td style="text-align:right; width: 7%;">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            
            </asp:DataList>
        </div>
        <br />
        
        <table style="width: 100%;">
            <tr>
                <td style="text-align:left; width:50%;" >
                    <%--<div style="font-family: Arial, Helvetica, sans-serif; font-size: 11px">
                            No se Aceptan Cambios ni Devoluciones<br />
                            Precios Sujetos a Variacion sin Previo Aviso<br />
                            <div style="font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: bold;">
                                NOTA: SE RECOMIENDA LA APLICACION DEL PROTECTOR SELLANTE EN TODO PORCELANATO
                                PULIDO UNA VEZ LIMPIO Y&nbsp; ANTES DE FRAGUAR
                            </div>
                    </div>--%>
                </td>
                <td style="width:15%;"><%--&nbsp;--%></td>
                <td style="text-align:left; width:15%; vertical-align:top">
                    <div style="font-family: Arial, Helvetica, sans-serif; font-size: 10px;">
                        Valor Neto <br />
                        I.G.V. <br />
                        Percepción <br />
                        Total
                    </div>
                </td>
                <td style="text-align: right; width:20%; vertical-align:top">
                    <div style="font-family: Arial, Helvetica, sans-serif; text-align: right;">
                        <asp:Label ID="lblValor" runat="server" Font-Names="Arial" Font-Size="10px" /><br />
                        <asp:Label ID="lblIgv" runat="server" Font-Names="Arial" Font-Size="10px" /><br />
                        <asp:Label ID="lblPercep" runat="server" Font-Names="Arial" Font-Size="10px" /><br />
                        <asp:Label ID="lblTotal" runat="server" Font-Names="Arial" Font-Size="10px" />
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="3"></td>
                <td style="text-align:right;">
                    <%--&nbsp;--%>
                </td>
            </tr>
        </table>

        <table>
            <tr>
                <td style="font-family:Courier New;font-size:11px;">OBSERVACIONES:</td>
            </tr>
            <tr>
                <td>
                    <asp:GridView ID="GdvGlosa" runat="server" AutoGenerateColumns="False" 
                                  Font-Names="Courier New"  Font-Size="11px" HorizontalAlign="Justify" 
                        Width="100%" BorderWidth="0px" ShowHeader="false">
                          <Columns>
                            <asp:BoundField DataField="glosa">
                                <ItemStyle HorizontalAlign="Justify" BorderStyle="NotSet"></ItemStyle>
                            </asp:BoundField>                                 
                        </Columns>
                        <RowStyle BorderWidth="0px"/>
                    </asp:GridView>
                </td>
            </tr>
        </table>                        
    </div>
    
    <script type="text/javascript">
        function imprimirPagina() {
            if (window.print)
            {
                document.getElementById("btnImprimir").style.display = 'none';
                window.print();
                if (window.opera){ 
                    setTimeout("document.getElementById('btnImprimir').style.display = ''", 1); 
                }else{
                    document.getElementById("btnImprimir").style.display = '';
                }
            }
            else{
                alert("Por favor, presione 'Ctrl + P' o vaya al menú Archivo y seleccione Imprimir.");
            }
        }
    </script>
    
    </form>
    
    </body>
</html>
